<script setup>
import { ref, reactive, getCurrentInstance, onMounted, watch, render } from "vue"

import { CirclePlus } from 'element-plus';
const instance = getCurrentInstance()
const _this = instance.appContext.config.globalProperties //vue3获取当前this

// 组件中使用，接收传参的
let propsData = defineProps({
  searchForm: Object
})
// 组件中使用，接收事件的
const emits = defineEmits(['search', 'addUser']);

const onSubmit = () => {
  emits('search')
}

const onAddUser = () => {
  emits('addUser')
}
</script>

<template>
  <el-form :inline="true" :model="searchForm" class="form_search_table">
    <el-form-item label="Search" >
      <el-input class="account_input" v-model="searchForm.search" placeholder="Search for user ID/user name/nick name…" clearable />
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">Query</el-button>
      <div class="event_btn">
        <el-button type="primary" :icon="CirclePlus" @click="onAddUser">Add User</el-button>
      </div>
    </el-form-item>
  </el-form>
</template>
<style scoped lang="less">
.form_search_table {
	.account_input {
    width: 458px;
  }
}
</style>